﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true"
    CodeFile="Patients.aspx.cs" Inherits="Default2" Title="Пациенти" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
    <asp:MultiView ID="mvPatients" runat="server">
        <asp:View ID="vInsertPatient" runat="server" onload="vInsertPatient_Load">
            <table style="border-right: #99ccff thin solid; border-top: #99ccff thin solid; border-left: #99ccff thin solid;
                border-bottom: #99ccff thin solid" width="100%">
                <tr>
                    <td style="width: 5%; height: 21px;">
                        &nbsp;</td>
                    <td style="width: 118%; height: 21px;" colspan="2">
                        <b>РЕГИСТРИРАНЕ НА ПАЦИЕНТИ В СИСТЕМАТА</b></td>
                </tr>
                <tr>
                    <td style="width: 5%">
                        &nbsp;</td>
                    <td style="width: 118%" colspan="2">
                        &nbsp;</td>
                </tr>
                <tr runat="server" id="trAddPatient">
                    <td style="width: 5%; height: 137px;">
                    </td>
                    <td colspan="2" style="height: 137px">
                        <asp:DetailsView ID="dvPatient" runat="server" AutoGenerateRows="False" DataKeyNames="PatientID"
                            DataSourceID="sdsPatients" DefaultMode="Insert" OnItemInserted="dvpatient_ItemInserted" OnItemUpdated="dvPatient_ItemUpdated">
                            <Fields>
                                <asp:BoundField DataField="PatientID" HeaderText="PatientID" InsertVisible="False"
                                    ReadOnly="True" SortExpression="PatientID" />
                                <asp:TemplateField HeaderText="ЕГН:* " SortExpression="EGN">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtEGN" runat="server" Text='<%# Bind("EGN") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtEGN" runat="server" Width="200px" MaxLength="10" Text='<%# Bind("EGN") %>'></asp:TextBox>
                          <%--              <asp:RequiredFieldValidator ID="rfvEGN" runat="server" ToolTip="Въведи ЕГН!" ControlToValidate="txtEGN"
                                          ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revEGN" runat="server" ToolTip="Невалиден ЕГН!"
                                            ControlToValidate="txtEGN" ValidationGroup="vsPatientsInsert" ValidationExpression="(^\d{10})">*</asp:RegularExpressionValidator>--%>
 <!--My code -->         
                                        <asp:CustomValidator ID="cvEGN" runat="server" ToolTip="Въведи ЕГН!" ControlToValidate="txtEGN"
                                          ValidationGroup="vsPatientsInsert" OnServerValidate="IsEgnValid" Display="dynamic" >*</asp:CustomValidator>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblEGN" runat="server" Text='<%# Bind("EGN") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField SortExpression="Name" HeaderText="Име:* ">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtName" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtName" runat="server" Width="200px" Text='<%# Bind("Name") %>'></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvName" runat="server" ToolTip="Въведи име!" ControlToValidate="txtName"
                                            ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblName" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Презиме:" SortExpression="MiddleName">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtMiddleName" runat="server" Text='<%# Bind("MiddleName") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtMiddleName" runat="server" Width="200px" Text='<%# Bind("MiddleName") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblMiddleName" runat="server" Text='<%# Bind("MiddleName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Фамилия:* " SortExpression="LastName">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtLastName" runat="server" Text='<%# Bind("LastName") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtLastName" runat="server" Width="200px" Text='<%# Bind("LastName") %>'></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvLastName" runat="server" ToolTip="Въведи фамилия!"
                                            ControlToValidate="txtLastName" ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblLastName" runat="server" Text='<%# Bind("LastName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Възраст:* " SortExpression="Age">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtAge" runat="server" Text='<%# Bind("Age") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtAge" runat="server" Width="200px" Text='<%# Bind("Age") %>'></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvAge" runat="server" ToolTip="Въведи възраст!"
                                            ControlToValidate="txtAge" ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revAge" runat="server" ToolTip="Невалидна възраст!"
                                            ControlToValidate="txtAge" ValidationGroup="vsPatientsInsert" ValidationExpression="(^\d{1,3})">*</asp:RegularExpressionValidator>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblAge" runat="server" Text='<%# Bind("Age") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Телефон: " SortExpression="Telephone">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtTelephone" runat="server" Text='<%# Bind("Telephone") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtTelephone" runat="server" Width="200px" Text='<%# Bind("Telephone") %>'></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvTel" runat="server" ToolTip="Въведи телефон!"
                                            ControlToValidate="txtTelephone" ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblTelephone" runat="server" Text='<%# Bind("Telephone") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="гр.(с.):*" SortExpression="City">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtCity" runat="server" Text='<%# Bind("City") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtCity" runat="server" Width="200px" Text='<%# Bind("City") %>'></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvCity" runat="server" ToolTip="Въведи град!" ControlToValidate="txtCity"
                                            ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblCity" runat="server" Text='<%# Bind("City") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Месторабота: " SortExpression="CurrentJob">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtCurrentJob" runat="server" Text='<%# Bind("CurrentJob") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtCurrentJob" runat="server" Width="200px" Text='<%# Bind("CurrentJob") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblCurrentJob" runat="server" Text='<%# Bind("CurrentJob") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="гр.(с.)" SortExpression="JobCity">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtJobCity" runat="server" Text='<%# Bind("JobCity") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtJobCity" runat="server" Width="200px" Text='<%# Bind("JobCity") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblJobCity" runat="server" Text='<%# Bind("JobCity") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Образование: " SortExpression="EducationID">
                                    <EditItemTemplate>
                                        &nbsp;<asp:DropDownList ID="ddlEducationID" runat="server" DataSourceID="sdsEducation"
                                            DataTextField="NameBG" DataValueField="EducationID" SelectedValue='<%# Bind("EducationID") %>'>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="ddlEducationID" runat="server" Width="150px" DataSourceID="sdsEducation"
                                            DataTextField="NameBG" DataValueField="EducationID"  SelectedValue='<%# Bind("EducationID") %>'>
                                        </asp:DropDownList>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblEducationID" runat="server" Text='<%# Bind("EducationID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Професия: " SortExpression="Profession">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtProfession" runat="server" Text='<%# Bind("Profession") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtProfession" runat="server" Width="200px" Text='<%# Bind("Profession") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblProfession" runat="server" Text='<%# Bind("Profession") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Докумен за самоличност: " SortExpression="IDCardType">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlIDCardType" runat="server" Width="150px" DataSourceID="sdsCardType"
                                            DataTextField="NameBG" DataValueField="CardID"  SelectedValue='<%# Bind("IDCardType") %>'>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="ddlIDCardType" runat="server" Width="150px" DataSourceID="sdsCardType"
                                            DataTextField="NameBG" DataValueField="CardID"  SelectedValue='<%# Bind("IDCardType") %>'>
                                        </asp:DropDownList>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblIDCardType" runat="server" Text='<%# Bind("IDCardType") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Номер:* " SortExpression="IDCardNum">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtIDCardNum" runat="server" Text='<%# Bind("IDCardNum") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtIDCardNum" runat="server" Width="200px" Text='<%# Bind("IDCardNum") %>'></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvCardNumber" runat="server" ToolTip="Въведи номер на документ!"
                                            ControlToValidate="txtIDCardNum" ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revCardNum" runat="server" ToolTip="Невалиден номер на документ!"
                                            ControlToValidate="txtIDCardNum" ValidationGroup="vsPatientsInsert" ValidationExpression="(^\d{7,})">*</asp:RegularExpressionValidator>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblIDCardNum" runat="server" Text='<%# Bind("IDCardNum") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Изаден от: " SortExpression="IDCardIssuedBy">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtIDCardIssuedBy" runat="server" Text='<%# Bind("IDCardIssuedBy") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtIDCardIssuedBy" runat="server" Width="200px" Text='<%# Bind("IDCardIssuedBy") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblIDCardIssuedBy" runat="server" Text='<%# Bind("IDCardIssuedBy") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Издаден на:" SortExpression="IDCardIssueDate">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtIDCardIssueDate" runat="server" Text='<%# Bind("IDCardIssueDate", "{0:dd/MM/yyyy}") %>'></asp:TextBox>                                       
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtIDCardIssueDate" runat="server" Width="200px" Text='<%# Bind("IDCardIssueDate", "{0:dd/MM/yyyy}") %>'></asp:TextBox>
                                        <asp:RangeValidator ID="cvIDCardIssueDate" runat="server" ToolTip="Невалидна дата!"
                                            ControlToValidate="txtIDCardIssueDate" ValidationGroup="vsPatientsInsert" Type="Date"
                                            MaximumValue="12/12/2150" MinimumValue="01/01/1111">*</asp:RangeValidator>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblIDCardIssueDate" runat="server" Text='<%# Bind("IDCardIssueDate", "{0:dd/MM/yyyy}") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:CheckBoxField DataField="ISWasIllByHepatit" HeaderText="Боледувал от хепатит:"
                                    SortExpression="ISWasIllByHepatit" />
                                <asp:CheckBoxField DataField="InfectiousFriends" HeaderText="Контакт със заразно болни: "
                                    SortExpression="InfectiousFriends" />
                                <asp:TemplateField HeaderText="Дата на регистрация: " SortExpression="DateOfSignUp">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtDateOfSignUp" runat="server" Text='<%# Bind("DateOfSignUp", "{0:dd/MM/yyyy}") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtDateOfSignUp" runat="server" Width="200px" Text='<%# Bind("DateOfSignUp", "{0:dd/MM/yyyy}") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblDateOfSignUp" runat="server" Text='<%# Bind("DateOfSignUp", "{0:dd/MM/yyyy}") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:CheckBoxField DataField="IsSendByCompany" HeaderText="Изпратен от фирма:"
                                    SortExpression="ISWasIllByHepatit" />
                                <asp:TemplateField HeaderText="Фирма: " SortExpression="CompanyID">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlCompanyID" runat="server" Width="150px" DataSourceID="sdsCompany"
                                            DataTextField="CompanyName" DataValueField="CompanyID" SelectedValue='<%# Bind("CompanyID") %>'>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="ddlCompanyID" runat="server" Width="150px" DataSourceID="sdsCompany"
                                            DataTextField="CompanyName" DataValueField="CompanyID" SelectedValue='<%# Bind("CompanyID") %>'>
                                        </asp:DropDownList>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblCompanyID" runat="server" Text='<%# Bind("CompanyID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField ShowHeader="False">
                                    <InsertItemTemplate>
                                        <asp:LinkButton ID="lbAddPatient" runat="server" CausesValidation="True" CommandName="Insert"
                                            Text="Добави пациент" ValidationGroup="vsPatientsInsert"></asp:LinkButton>
                                        &nbsp;&nbsp;&nbsp;
                                        <asp:LinkButton ID="lbCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                            Text="Прекрати"></asp:LinkButton>
                                    </InsertItemTemplate>
                                </asp:TemplateField>
                            </Fields>
                        </asp:DetailsView>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <asp:ValidationSummary ID="vsPatientsInsert" runat="server" ValidationGroup="vsPatientsInsert"
                            ShowSummary="false" />
                    </td>
                </tr>
                <tr>
                    <td style="height: 15px;">
                    </td>
                </tr>
                <tr>
                    <td style="width: 5%;">
                        &nbsp;</td>
                    <td style="width: 118%" colspan="2">
                        <asp:SqlDataSource ID="sdsEducation" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_EducationSelect" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsCardType" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_IDCardsSelect" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsCompany" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            DeleteCommand="up_DeleteCompany" DeleteCommandType="StoredProcedure" InsertCommand="up_CreateCompany"
                            InsertCommandType="StoredProcedure" SelectCommand="up_CompanySelect" SelectCommandType="StoredProcedure"
                            UpdateCommand="up_AttendantsDelete" UpdateCommandType="StoredProcedure">
                            <DeleteParameters>
                                <asp:Parameter Name="companyID" Type="Int32" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="AttendantID" Type="Int32" />
                            </UpdateParameters>
                            <InsertParameters>
                                <asp:Parameter Name="companyName" Type="String" />
                                <asp:Parameter Name="bULSTAT" Type="String" />
                                <asp:Parameter Name="mOL" Type="String" />
                                <asp:Parameter Name="city" Type="String" />
                                <asp:Parameter Name="address" Type="String" />
                                <asp:Parameter Name="postCode" Type="String" />
                                <asp:Parameter Name="phone" Type="String" />
                                <asp:Parameter Name="invoiceAddress" Type="String" />
                            </InsertParameters>
                        </asp:SqlDataSource>
                    </td>
                </tr>
            </table>
            <br />
        </asp:View>
        <asp:View ID="vEditPatient" runat="server">
            <table style="border-right: #99ccff thin solid; border-top: #99ccff thin solid; border-left: #99ccff thin solid;
                border-bottom: #99ccff thin solid" width="100%">
                <tr>
                    <td style="width: 5%; height: 21px;">
                        &nbsp;</td>
                    <td style="width: 118%; height: 21px;" colspan="2">
                        <b>РЕДАКТИРАНЕ НА ПАЦИЕНТИ</b></td>
                </tr>
                <tr>
                    <td style="width: 5%; height: 21px;">
                        &nbsp;</td>
                    <td style="width: 118%; height: 21px;" colspan="2">
                        <asp:DetailsView ID="dvEditPatient" runat="server" AutoGenerateRows="False"
                            DataKeyNames="PatientID" DataSourceID="sdsPatientGetByID" DefaultMode="Edit" OnItemUpdated="dvEditPatient_ItemUpdated">
                            <Fields>
                                <asp:BoundField DataField="PatientID" HeaderText="PatientID" InsertVisible="False"
                                    ReadOnly="True" SortExpression="PatientID" Visible="False" />
                                <asp:TemplateField HeaderText="Име: " SortExpression="Name">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtNameEdit" Width="200px"  runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtNameEdit" Width="200px"  runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblNameEdit" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Презиме: " SortExpression="MiddleName">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtMiddleNameEdit" Width="200px"  runat="server" Text='<%# Bind("MiddleName") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtMiddleNameEdit" Width="200px"  runat="server" Text='<%# Bind("MiddleName") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblMiddleNameEdit" runat="server" Text='<%# Bind("MiddleName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Фамилия: " SortExpression="LastName">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtLastNameEdit" Width="200px" runat="server" Text='<%# Bind("LastName") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtLastNameEdit" Width="200px" runat="server" Text='<%# Bind("LastName") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblLastNameEdit" runat="server" Text='<%# Bind("LastName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="ЕГН: " SortExpression="EGN">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtEGNEdit" Width="200px" runat="server" Text='<%# Bind("EGN") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtEGNEdit" Width="200px" runat="server" Text='<%# Bind("EGN") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblEGNEdit" runat="server" Text='<%# Bind("EGN") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Възраст: " SortExpression="Age">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtAgeEdit" Width="200px" runat="server" Text='<%# Bind("Age") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtAgeEdit" Width="200px" runat="server" Text='<%# Bind("Age") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblAgeEdit" runat="server" Text='<%# Bind("Age") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Телефон: " SortExpression="Telephone">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtTelephone" runat="server" Text='<%# Bind("Telephone") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtTelephone" runat="server" Width="200px" Text='<%# Bind("Telephone") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblTelephone" runat="server" Text='<%# Bind("Telephone") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="гр.(с.):" SortExpression="City">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtCityEdit" Width="200px" runat="server" Text='<%# Bind("City") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtCityEdit" Width="200px" runat="server" Text='<%# Bind("City") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblCityEdit" runat="server" Text='<%# Bind("City") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Месторабота: " SortExpression="CurrentJob">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtCurrentJobEdit" Width="200px" runat="server" Text='<%# Bind("CurrentJob") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtCurrentJobEdit" Width="200px" runat="server" Text='<%# Bind("CurrentJob") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblCurrentJobEdit" runat="server" Text='<%# Bind("CurrentJob") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="гр.(с.):" SortExpression="JobCity">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtJobCityEdit" Width="200px" runat="server" Text='<%# Bind("JobCity") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtJobCityEdit" Width="200px" runat="server" Text='<%# Bind("JobCity") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblJobCityEdit" runat="server" Text='<%# Bind("JobCity") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Образование: " SortExpression="EducationID">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlEducationEdit" Width="150px" runat="server" DataSourceID="sdsEducation"
                                            DataTextField="NameBG" DataValueField="EducationID" SelectedValue='<%# Bind("EducationID") %>'></asp:DropDownList>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="ddlEducationEdit" Width="150px" runat="server" DataSourceID="sdsEducation"
                                            DataTextField="NameBG" DataValueField="EducationID" SelectedValue='<%# Bind("EducationID") %>'>
                                        </asp:DropDownList>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblEducationEdit" runat="server" Text='<%# Bind("EducationID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Професия: " SortExpression="Profession">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtProfessionEdit" Width="200px" runat="server" Text='<%# Bind("Profession") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtProfessionEdit" Width="200px" runat="server" Text='<%# Bind("Profession") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblProfessionEdit" runat="server" Text='<%# Bind("Profession") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Докумен за самоличност: " SortExpression="IDCardType">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlCardTypeEdit" Width="150px" runat="server" DataSourceID="sdsCardType"
                                            DataTextField="NameBG" DataValueField="CardID"  SelectedValue='<%# Bind("IDCardType") %>'></asp:DropDownList>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="ddlCardTypeEdit" Width="150px" runat="server" DataSourceID="sdsCardType"
                                            DataTextField="NameBG" DataValueField="CardID" SelectedValue='<%# Bind("IDCardType") %>'>
                                        </asp:DropDownList>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblIDCardTypeEdit" runat="server" Text='<%# Bind("IDCardType") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Номер: " SortExpression="IDCardNum">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtIDCardNumEdit" Width="200px" runat="server" Text='<%# Bind("IDCardNum") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtIDCardNumEdit" Width="200px" runat="server" Text='<%# Bind("IDCardNum") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblIDCardNumEdit" runat="server" Text='<%# Bind("IDCardNum") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Издаден от: " SortExpression="IDCardIssuedBy">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtIDCardIssuedByEdit" Width="200px" runat="server" Text='<%# Bind("IDCardIssuedBy") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtIDCardIssuedByEdit" Width="200px" runat="server" Text='<%# Bind("IDCardIssuedBy") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblIDCardIssuedByEdit" runat="server" Text='<%# Bind("IDCardIssuedBy") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Издаден на: " SortExpression="IDCardIssueDate">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtIDCardIssueDateEdit" Width="200px" runat="server" Text='<%# Bind("IDCardIssueDate", "{0:dd/MM/yyyy}") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtIDCardIssueDateEdit" Width="200px" runat="server" Text='<%# Bind("IDCardIssueDate", "{0:dd/MM/yyyy}") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblIDCardIssueDateEdit" runat="server" Text='<%# Bind("IDCardIssueDate", "{0:dd/MM/yyyy}") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:CheckBoxField DataField="ISWasIllByHepatit" HeaderText="Боледувал от хепатит: " SortExpression="ISWasIllByHepatit" />
                                <asp:CheckBoxField DataField="InfectiousFriends" HeaderText="Контакт със заразно болни: " SortExpression="InfectiousFriends" />
                                <asp:TemplateField HeaderText="Дата на регистрация: " SortExpression="DateOfSignUp">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtDateOfSignUpEdit" Width="200px" runat="server" Text='<%# Bind("DateOfSignUp", "{0:dd/MM/yyyy}") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtDateOfSignUpEdit" Width="200px" runat="server" Text='<%# Bind("DateOfSignUp", "{0:dd/MM/yyyy}") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblDateOfSignUpEdit" runat="server" Text='<%# Bind("DateOfSignUp", "{0:dd/MM/yyyy}") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:CheckBoxField DataField="IsSendByCompany" HeaderText="Изпратен от фирма:"
                                    SortExpression="ISWasIllByHepatit" />
                                <asp:TemplateField HeaderText="Фирма: " SortExpression="CompanyID">
                                    <EditItemTemplate>
                                       <asp:DropDownList ID="ddlCompanyEdit" Width="150px" runat="server" DataSourceID="sdsCompany"
                                            DataTextField="CompanyName" DataValueField="CompanyID" SelectedValue='<%# Bind("CompanyID") %>'>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="ddlCompanyEdit" Width="150px" runat="server" DataSourceID="sdsCompany"
                                            DataTextField="CompanyName" DataValueField="CompanyID" SelectedValue='<%# Bind("CompanyID") %>'>
                                        </asp:DropDownList>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblCompanyIDEdit" runat="server" Text='<%# Bind("CompanyID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField ShowHeader="False">
                                    <EditItemTemplate>
                                        <asp:LinkButton ID="lbUpdate" runat="server" CausesValidation="True" CommandName="Update"
                                            Text="Обнови" OnClick="lbUpdate_Click"></asp:LinkButton>
                                        &nbsp;&nbsp;&nbsp;
                                        <asp:LinkButton ID="lbtnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                            Text="Прекрати" OnClick="lbtnCancel_Click"></asp:LinkButton>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                            </Fields>
                        </asp:DetailsView>
                    </td>
                </tr>
                <tr>
                    <td style="width: 5%;">
                        &nbsp;</td>
                    <td style="width: 118%" colspan="2">
                        <asp:SqlDataSource ID="sdsPatientGetByID" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            DeleteCommand="up_PatientsDelete" DeleteCommandType="StoredProcedure" InsertCommand="up_PatientsCreate"
                            InsertCommandType="StoredProcedure" SelectCommand="up_PatientsGetByID" SelectCommandType="StoredProcedure"
                            UpdateCommand="up_PatientsUpdate" UpdateCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="gvPatients" Name="PatientID" PropertyName="SelectedValue"
                                    Type="Int32" />
                            </SelectParameters>
                            <DeleteParameters>
                                <asp:Parameter Name="patientID" Type="Int32" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="patientID" Type="Int32" />
                                <asp:Parameter Name="name" Type="String" />
                                <asp:Parameter Name="middleName" Type="String" />
                                <asp:Parameter Name="lastName" Type="String" />
                                <asp:Parameter Name="egn" Type="String" />
                                <asp:Parameter Name="age" Type="Int16" />
                                <asp:Parameter Name="city" Type="String" />
                                <asp:Parameter Name="currentJob" Type="String" />
                                <asp:Parameter Name="jobCity" Type="String" />
                                <asp:Parameter Name="educationID" Type="Int16" />
                                <asp:Parameter Name="profession" Type="String" />
                                <asp:Parameter Name="iDCardType" Type="Int16" />
                                <asp:Parameter Name="iDCardNum" Type="String" />
                                <asp:Parameter Name="iDCardIssuedBy" Type="String" />
                                <asp:Parameter Name="iDCardIssueDate" Type="DateTime" />
                                <asp:Parameter Name="iSWasIllByHepatit" Type="Boolean" />
                                <asp:Parameter Name="infectiousFriends" Type="Boolean" />
                                <asp:Parameter Name="dateOfSignUp" Type="DateTime" />
                                <asp:Parameter Name="companyID" Type="Int32" />
                                <asp:Parameter Name="isSendByCompany" Type="Boolean" />
                                <asp:Parameter Name="Telephone" Type="String" />
                            </UpdateParameters>
                            <InsertParameters>
                                <asp:Parameter Name="name" Type="String" />
                                <asp:Parameter Name="middleName" Type="String" />
                                <asp:Parameter Name="lastName" Type="String" />
                                <asp:Parameter Name="egn" Type="String" />
                                <asp:Parameter Name="age" Type="Int16" />
                                <asp:Parameter Name="city" Type="String" />
                                <asp:Parameter Name="currentJob" Type="String" />
                                <asp:Parameter Name="jobCity" Type="String" />
                                <asp:Parameter Name="educationID" Type="Int16" />
                                <asp:Parameter Name="profession" Type="String" />
                                <asp:Parameter Name="iDCardType" Type="Int16" />
                                <asp:Parameter Name="iDCardNum" Type="String" />
                                <asp:Parameter Name="iDCardIssuedBy" Type="String" />
                                <asp:Parameter Name="iDCardIssueDate" Type="DateTime" />
                                <asp:Parameter Name="iSWasIllByHepatit" Type="Boolean" />
                                <asp:Parameter Name="infectiousFriends" Type="Boolean" />
                                <asp:Parameter Name="dateOfSignUp" Type="DateTime" />
                                <asp:Parameter Name="companyID" Type="Int32" />
                                <asp:Parameter Name="isSendByCompany" Type="Boolean" />
                                <asp:Parameter Name="Telephone" Type="String" />
                            </InsertParameters>
                        </asp:SqlDataSource>
                        &nbsp;&nbsp;
                    </td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>
    <table style="border-right: #99ccff thin solid; border-top: #99ccff thin solid; border-left: #99ccff thin solid;
        border-bottom: #99ccff thin solid" width="100%">
        <tr>
            <td style="height: 21px" colspan="3">
                <b>&nbsp;СПИСЪК НА РЕГИСТРИРАНИТЕ ПАЦИЕНТИ&nbsp;</b></td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:GridView ID="gvPatients" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                    CellPadding="4" DataSourceID="sdsPatients" ForeColor="#333333" GridLines="None"
                    DataKeyNames="PatientID" AllowPaging="True" PageSize="5" OnSelectedIndexChanged="gvPatients_SelectedIndexChanged">
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#999999" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <Columns>
                        <asp:TemplateField ShowHeader="False">
                            <ItemTemplate>
                                <asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select"
                                    Text="Редактирай"></asp:LinkButton>
                                &nbsp;&nbsp;&nbsp;
                                <asp:LinkButton ID="lbDelete" runat="server" CausesValidation="False" CommandName="Delete"
                                    Text="Изтрий"></asp:LinkButton>&nbsp;&nbsp;&nbsp;
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="PatientID" HeaderText="PatientID" InsertVisible="False"
                            ReadOnly="True" SortExpression="PatientID" Visible="False" />
                        <asp:BoundField DataField="Name" HeaderText="Име" SortExpression="Name" />
                        <asp:BoundField DataField="MiddleName" HeaderText="Презиме" SortExpression="MiddleName"
                            Visible="False" />
                        <asp:BoundField DataField="LastName" HeaderText="Фамилия" SortExpression="LastName" />
                        <asp:BoundField DataField="EGN" HeaderText="ЕГН" SortExpression="EGN" Visible="False" />
                        <asp:BoundField DataField="Age" HeaderText="Възраст" SortExpression="Age" />
                        <asp:BoundField DataField="City" HeaderText="гр.(с.)" SortExpression="City" />
                        <asp:BoundField DataField="CurrentJob" HeaderText="Месторабота" SortExpression="CurrentJob" />
                        <asp:BoundField DataField="JobCity" HeaderText="гр.(с.)" SortExpression="JobCity" />
                        <asp:BoundField DataField="EducationID" HeaderText="Образование" SortExpression="EducationID" />
                        <asp:BoundField DataField="Profession" HeaderText="Професия" SortExpression="Profession" />
                        <asp:BoundField DataField="IDCardType" HeaderText="Лично удостоверение" SortExpression="IDCardType"
                            Visible="False" />
                        <asp:BoundField DataField="IDCardNum" HeaderText="Номер" SortExpression="IDCardNum"
                            Visible="False" />
                        <asp:BoundField DataField="IDCardIssuedBy" HeaderText="Издаден" SortExpression="IDCardIssuedBy"
                            Visible="False" />
                        <asp:BoundField DataField="IDCardIssueDate" HeaderText="Дата" SortExpression="IDCardIssueDate"
                            Visible="False" ApplyFormatInEditMode="True" DataFormatString="{0:dd/MM/yyyy}" HtmlEncode="False" />
                        <asp:CheckBoxField DataField="ISWasIllByHepatit" HeaderText="Боледувал от хепатит"
                            SortExpression="ISWasIllByHepatit" />
                        <asp:CheckBoxField DataField="InfectiousFriends" HeaderText="Контакт със заразно болни"
                            SortExpression="InfectiousFriends" />
                        <asp:BoundField DataField="DateOfSignUp" HeaderText="Дата на постъпване" SortExpression="DateOfSignUp" ApplyFormatInEditMode="True" DataFormatString="{0:dd/MM/yyyy}" HtmlEncode="False" />
                        <asp:CheckBoxField DataField="IsSendByCompany" HeaderText="Изпратен ли е от фирма:"
                            SortExpression="InfectiousFriends" />
                        <asp:BoundField DataField="CompanyID" HeaderText="Изпратен от фирма" SortExpression="CompanyID"
                            Visible="False" />
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td style="width: 5%;">
                &nbsp;</td>
            <td style="width: 118%" colspan="2">
                <asp:SqlDataSource ID="sdsPatients" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                    DeleteCommand="up_PatientsDelete" DeleteCommandType="StoredProcedure" InsertCommand="up_PatientsCreate"
                    InsertCommandType="StoredProcedure" SelectCommand="up_PatientsGetAll" SelectCommandType="StoredProcedure"
                    UpdateCommand="up_PatientsUpdate" UpdateCommandType="StoredProcedure">
                    <DeleteParameters>
                        <asp:Parameter Name="patientID" Type="Int32" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="patientID" Type="Int32" />
                        <asp:Parameter Name="name" Type="String" />
                        <asp:Parameter Name="middleName" Type="String" />
                        <asp:Parameter Name="lastName" Type="String" />
                        <asp:Parameter Name="egn" Type="String" />
                        <asp:Parameter Name="age" Type="Int16" />
                        <asp:Parameter Name="city" Type="String" />
                        <asp:Parameter Name="currentJob" Type="String" />
                        <asp:Parameter Name="jobCity" Type="String" />
                        <asp:Parameter Name="educationID" Type="Int16" />
                        <asp:Parameter Name="profession" Type="String" />
                        <asp:Parameter Name="iDCardType" Type="Int16" />
                        <asp:Parameter Name="iDCardNum" Type="String" />
                        <asp:Parameter Name="iDCardIssuedBy" Type="String" />
                        <asp:Parameter Name="iDCardIssueDate" Type="DateTime" />
                        <asp:Parameter Name="iSWasIllByHepatit" Type="Boolean" />
                        <asp:Parameter Name="infectiousFriends" Type="Boolean" />
                        <asp:Parameter Name="dateOfSignUp" Type="DateTime" />
                        <asp:Parameter Name="companyID" Type="Int32" />
                        <asp:Parameter Name="isSendByCompany" Type="Boolean" />
                        <asp:Parameter Name="Telephone" Type="String" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:Parameter Name="name" Type="String" />
                        <asp:Parameter Name="middleName" Type="String" />
                        <asp:Parameter Name="lastName" Type="String" />
                        <asp:Parameter Name="egn" Type="String" />
                        <asp:Parameter Name="age" Type="Int16" />
                        <asp:Parameter Name="city" Type="String" />
                        <asp:Parameter Name="currentJob" Type="String" />
                        <asp:Parameter Name="jobCity" Type="String" />
                        <asp:Parameter Name="educationID" Type="Int16" />
                        <asp:Parameter Name="profession" Type="String" />
                        <asp:Parameter Name="iDCardType" Type="Int16" />
                        <asp:Parameter Name="iDCardNum" Type="String" />
                        <asp:Parameter Name="iDCardIssuedBy" Type="String" />
                        <asp:Parameter Name="iDCardIssueDate" Type="DateTime" />
                        <asp:Parameter Name="iSWasIllByHepatit" Type="Boolean" />
                        <asp:Parameter Name="infectiousFriends" Type="Boolean" />
                        <asp:Parameter Name="dateOfSignUp" Type="DateTime" />
                        <asp:Parameter Name="companyID" Type="Int32" />
                        <asp:Parameter Name="isSendByCompany" Type="Boolean" />
                        <asp:Parameter Name="Telephone" Type="String" />
                    </InsertParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
</asp:Content>
